// 某个模块的数据请求（增删改查！）

import $axios from "@/common/http";  // 封装的axios
import axios from "axios"   // 原生的axios
import { Message } from "element-ui"  // 提示框

export async function getMember(uid) {
    let res;
    if (uid) {
        res = await $axios.get("/memberinfo", { params: { uid } });
        return res.list[0];
    } else {
        res = await $axios.get("/memberlist");
        return res.list;
    }
}


export async function editMember(data) {
    let res = await $axios.post("/memberedit", data);
    Message.success(res.msg)
    return true;
}

